#pragma once
#include <stdint.h>
#include <evpp/buffer.h>

typedef struct {
    uint16_t cmd;
    uint16_t pack_len;
    uint32_t user_id;
    uint32_t session_id;
    uint32_t reserved;
} ProtoHeader;



class ProtoPackage {
public:
    ProtoPackage(ProtoHeader* header);
    ~ProtoPackage();

    void writeByte();
    void writeString();
    void writeWord();
    void writeInt32();
    void writeInt64();
    void writeBinary();
private:
    ProtoHeader header_;
    evpp::Buffer* buffer;
};